<?php
include "../include/global.php";
include "../include/admin_check.php";
$path = "/media/user/";

if($_GET['type']=="DEL"){
	$ID=$_GET['ID'];
	$stsql = "SELECT image FROM ".pre_table."admin WHERE id='$ID'";
	$row_img = recordset($stsql);
	if($row_img[image])
	   $Image_del = deletefile(const_Web_Path.$path.$row_img[image]);
	$stsql = "DELETE FROM ".pre_table."admin WHERE id='$ID'";
	$rs = execSQL($stsql);
	
	echo "<script language = 'javascript'>
			location.href = 'user.php?page=$page';
		</script>";
	exit(); 
}
?>

